<template>
  <a-popconfirm
    :content="t['是否执行']"
    position="br"
    :ok-text="t['确定']"
    :cancel-text="t['取消']"
    v-bind="$attrs"
    @ok="ok"
    @cancel="cancel"
  >
    <a-button :disabled="disabled" status="danger" type="text" v-bind="$attrs" class="p-2">
      <slot>
        <icon-delete size="14" />
        {{ t["批量删除"] }}
      </slot>
    </a-button>
  </a-popconfirm>
</template>

<script setup lang="ts">
const emit = defineEmits(["ok", "cancel"]);
const t = translate("公共模块");
defineProps<{
  disabled?: boolean;
}>();
function ok() {
  emit("ok");
}
function cancel() {
  emit("cancel");
}
</script>

<style lang="scss" scoped></style>
